import request from "@/utils/request";

//组列表
export function getGroupList() {
  return request({
    url: "/plat/group/list",
    method: "get"
  });
}
//添加组;

export function addGroup(data) {
  return request({
    url: "/plat/group/add",
    method: "post",
    data: data
  });
}
//添加组
export function editGroup(id, data) {
  return request({
    url: "/plat/group/edit/" + id,
    method: "post",
    data: data
  });
}

//删除组
export function deleteGroup(id) {
  return request({
    url: "/plat/group/delete/" + id,
    method: "delete"
  });
}

//读取group信息
export function getGroupRequest(id) {
  return request({
    url: "/plat/group/get/" + id,
    method: "get"
  });
}
//移动组
export function moveToGroup(data) {
  return request({
    url: "/plat/group/member/move",
    method: "post",
    data: data
  });
}
//拷贝组成员
export function copyToGroup(data) {
  return request({
    url: "/plat/group/member/copy",
    method: "post",
    data: data
  });
}

//取消分组
export function cancelGroup(data) {
  return request({
    url: "/plat/group/member/cancel",
    method: "post",
    data: data
  });
}

//许可列表
export function getLicenseList(data) {
  return request({
    url: "/azure/license/list",
    method: "get",
    params: data
  });
}

export function getLicensePageList(data) {
  return request({
    url: "/azure/license/pagelist",
    method: "get",
    params: data
  });
}
//分配许可
export function assignLicense(data) {
  return request({
    url: "/azure/license/assign",
    method: "post",
    data: data
  });
}
